Skip to main content

EstuaryClient.UserApi

All URIs are relative to //api.estuary.tech/

MethodHTTP requestDescription
userApiKeysGetGET /user/api-keysGet API keys for a user
userApiKeysKeyOrHashDeleteDELETE /user/api-keys/{key_or_hash}Revoke a User API Key.
userApiKeysPostPOST /user/api-keysCreate API keys for a user
userExportGetGET /user/exportExport user data
userStatsGetGET /user/statsGet stats for the current user

userApiKeysGet

[ApiGetApiKeysResp] userApiKeysGet()

Get API keys for a user

This endpoint is used to get API keys for a user. In estuary, each user can be given multiple API keys (tokens). This endpoint can be used to retrieve all available API keys for a given user.

Example

import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;

// Configure API key authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';

let apiInstance = new EstuaryClient.UserApi();
apiInstance.userApiKeysGet((error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});

Parameters

This endpoint does not need any parameter.

Return type

[ApiGetApiKeysResp]

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

userApiKeysKeyOrHashDelete

'String' userApiKeysKeyOrHashDelete(keyOrHash)

Revoke a User API Key.

This endpoint is used to revoke a user API key. In estuary, every user is assigned with an API key, this API key is generated and issued for each user and is primarily used to access all estuary features. This endpoint can be used to revoke the API key that's assigned to the user. Revoked API keys are completely deleted and are not recoverable.

Example

import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;

// Configure API key authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';

let apiInstance = new EstuaryClient.UserApi();
let keyOrHash = "keyOrHash_example"; // String | Key or Hash

apiInstance.userApiKeysKeyOrHashDelete(keyOrHash, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});

Parameters

NameTypeDescriptionNotes
keyOrHashStringKey or Hash

Return type

'String'

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

userApiKeysPost

ApiGetApiKeysResp userApiKeysPost(opts)

Create API keys for a user

This endpoint is used to create API keys for a user. In estuary, each user is given an API key to access all features.

Example

import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;

// Configure API key authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';

let apiInstance = new EstuaryClient.UserApi();
let opts = {
'expiry': "expiry_example", // String | Expiration - Expiration - Valid time units are ns, us (or µs), ms, s, m, h. for example 300h
'perms': "perms_example" // String | Permissions -- currently unused
};
apiInstance.userApiKeysPost(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});

Parameters

NameTypeDescriptionNotes
expiryStringExpiration - Expiration - Valid time units are ns, us (or µs), ms, s, m, h. for example 300h[optional]
permsStringPermissions -- currently unused[optional]

Return type

ApiGetApiKeysResp

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

userExportGet

'String' userExportGet()

Export user data

This endpoint is used to get API keys for a user.

Example

import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;

// Configure API key authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';

let apiInstance = new EstuaryClient.UserApi();
apiInstance.userExportGet((error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});

Parameters

This endpoint does not need any parameter.

Return type

'String'

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

userStatsGet

'String' userStatsGet()

Get stats for the current user

This endpoint is used to get stats for the current user.

Example

import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;

// Configure API key authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';

let apiInstance = new EstuaryClient.UserApi();
apiInstance.userStatsGet((error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});

Parameters

This endpoint does not need any parameter.

Return type

'String'

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json